package com.zhijian.medical.dao.local;


import com.zhijian.medical.entity.po.Device;
import com.zhijian.medical.entity.vo.request.DeviceSearchVo;
import com.zhijian.medical.entity.vo.response.DeviceVo;

import java.util.List;

public interface DeviceMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Device record);

    int insertSelective(Device record);

    Device selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Device record);

    int updateByPrimaryKey(Device record);

    int count(DeviceSearchVo deviceSearchVo);

    List<DeviceVo> selectList(DeviceSearchVo deviceSearchVo);

    /**
     * 根据类型查找设备
     *
     * @param type
     * @return
     */
    List<Device> selectListByType(String type);

    List<Device> selectListByTypeAndHospitalNumber(String type, String hospitalNumber);

    /**
     * 根据实验流程id查找扩增仪
     *
     * @param experimentProcessId
     * @return
     */
    List<Device> selectListByExperimentProcessId(Long experimentProcessId);

    DeviceVo selectVoById(Long id);

    /**
     * 查询出某天最新数据的code
     *
     * @param day
     * @return
     */
    String selectMaxCodeByDay(String day);
}